package com.example.study.basic.exception;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 自定义异常类
 * @author nannan
 */
@NoArgsConstructor
@Data
public class BasicException extends Exception {

    public String code;
    public String msg;

    public BasicException(String code,String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "BasicException{" +
                "code='" + code + '\'' +
                ", msg='" + msg + '\'' +
                '}';
    }
}
